n = int(input())

res_dict = {}
start = 3
t = 3
while start < 1e9:
    res_dict[start] = t
    t+=1
    start += t

##print(res_dict)

if n == 1:
    print('2 1')
elif n == 2:
    print('3 2 2')
else:
    if res_dict.get(n,False):
        for i in range(res_dict[n],0,-1):
            print(i,end=' ')
    else:
        for i in range(n):
            if res_dict.get(n-i,False):
                for i in range(res_dict[n-i],0,-1):
                    print(i,end=' ')

                break    
